#include "TextureLoader.h"

TextureLoader * TextureLoader::_self = 0;

TextureLoader::TextureLoader(void)
{
}

TextureLoader * TextureLoader::instance()
{
	if (!_self)
		_self = new TextureLoader;
	return _self;
}

GLuint TextureLoader::loadTexture(std::string fileName)
{
	GLuint texId = SOIL_load_OGL_texture(
				fileName.c_str(),
				SOIL_LOAD_AUTO,
				SOIL_CREATE_NEW_ID,
				SOIL_FLAG_POWER_OF_TWO
				| SOIL_FLAG_MIPMAPS
				| SOIL_FLAG_MULTIPLY_ALPHA
				| SOIL_FLAG_COMPRESS_TO_DXT
				| SOIL_FLAG_DDS_LOAD_DIRECT
				| SOIL_FLAG_INVERT_Y
				);
	return texId;
}